﻿#pragma once
#include <vtkm/cont/ArrayHandleGroupVec.h>
#include "System.h"
#include "worklet/EquationSet.h"

enum class BCEnum : BCType
{
  Wall = 1,
  FarField,
  Inlet,
  Outlet
};


class EulerEquation : public System
{
public:
  static constexpr UInt8 NUM_VARIABLES = 5;
  using VType = Vec<Real, NUM_VARIABLES>;

  EulerEquation(const Configuration& cfg);
  virtual ~EulerEquation(){};

  void Init() override;
  void virtual InitialCondition() = 0;
  void Evolve() override;

  void virtual UpdateResidual() = 0;
  void virtual TimeIntegration();
  void PreSolve();
  void Solve();
  void PostSolve();

  ArrayHandle<VType>& GetSolution();
  ArrayHandle<VType>& GetRhs();
  auto& GetEquationSet() { return _eq; }

protected:
  ArrayHandle<VType> _solution;
  ArrayHandle<VType> _rhs;
  EquationSet _eq;
};